# -*- coding:utf-8 -*-
__author__ = 'shuxin'
__date__ = '2020/6/13  15:45'

import json

from django.http import HttpResponse
from django.views import View


class OrderExportView(View):
    def post(self, request):
        info = {
            "msg": "success",
            "orderLists": [
                {
                    "auxOrderLists": [
                    ],
                    "createTime": "2017-11-27 15:19:36",
                    "orderNo": "5ecf645c1f04d678361fc777",
                    "orderStatus": "ISSUE_FINISH",
                    "tcOrderNo": "ITXXX"
                },
                {
                    "auxOrderLists": [
                    ],
                    "createTime": "2017-11-27 15:55:55",
                    "orderNo": "5ecf6540f88b9f14cf6ad662",
                    "orderStatus": "ISSUE_FINISH",
                    "tcOrderNo": " ITXXX "
                },
                {
                    "auxOrderLists": [
                    ],
                    "createTime": "2017-11-27 16:35:08",
                    "orderNo": "5ecf6595dde598baeac1b664",
                    "orderStatus": "ISSUE_FINISH",
                    "tcOrderNo": " ITXXX "
                },
                {
                    "auxOrderLists": [
                        {
                            "createTime": "2017-11-28 18:00:36",
                            "orderStatus": "ISSUE_FINISH",
                            "productType": 1,
                            "tczOrderNo": " ITXXXXXX "
                        },
                        {
                            "createTime": "2017-11-28 18:13:41",
                            "orderStatus": "ISSUE_FINISH",
                            "productType": 1,
                            "tczOrderNo": " ITXXXXXX "
                        },
                        {
                            "createTime": "2017-11-30 09:40:19",
                            "orderStatus": "ISSUE_FINISH",
                            "productType": 1,
                            "tczOrderNo": " ITXXXXXX "
                        }
                    ],
                    "createTime": "2017-11-28 17:31:25",
                    "orderNo": "5ecf662e3d1e6cc85abbd3f4",
                    "orderStatus": "ISSUE_FINISH",
                    "tcOrderNo": " ITXXX "
                }
            ],
            "status": "F0"
        }
        error_info = {
            "status": "F103",
            "msg": "订单状态不正确",
            "orderLists": None
        }

        return HttpResponse(json.dumps(info, ensure_ascii=False), content_type="application/json")
